home *** CD-ROM | disk | FTP | other *** search
/ Die Speccy' 97 / Die Speccy' 97.iso / amiga_system / the_aminet / comm / bbs / wwbbs31_source.lha / WWBBS / Docs / ABBEREXX.doc next >
Text File  |  1995-07-22  |  9KB  |  184 lines

  1. World Wide BBS 3.1 (22.7.95)
  2. Copyright ⌐ 1995 Arthur Choung
  3. ---
  4.  
  5.      WWBBS supports all ABBEREXX commands, a few Cnet commands for
  6. compatibility, and an extra rexx variable.  These can be used in REXX
  7. files, obviously, and also in MenuPrefs.
  8.  
  9.      The following is an excerpt from the documentation of TransAmiga by
  10. Tim Aston:
  11.  
  12.           ABBEREXX Commands:
  13.  
  14.                These are the commands that TransAmiga supports as a part of
  15.                the Amiga Bulletin Board External Rexx  (ABBEREXX) interface
  16.                command set.  These commands should be used when portability
  17.                to other ARexx supporting BBS's is desired.
  18.  
  19.                BBSIDENTIFY ABBEREXX BBS|EMULATION|NAME|SYSOP|TERM|USER -
  20.                Returns  certain   information,  depending   on  the  <what>
  21.                parameter.  Possible values are:
  22.                  ABBEREXX:  which   returns  the  current  version  of  the
  23.                ABBEREXX implementation (at the moment, '1.0').
  24.                  BBS: which  returns the  current version  of TransAmiga is
  25.                being used.
  26.                  EMULATION: indicates what type of terminal mode the caller
  27.                has selected.  It returns either 'ASCII' or 'ANSI'.
  28.                  NAME: returns the name you have set for the BBS.
  29.                [WWBBS will simply return `World Wide BBS'.]
  30.                  SYSOP: returns the name of the SysOp of the BBS.
  31.                  TERM: which returns a string of  the format  <baud> <rows>
  32.                <columns> <line number>, eg. 2400 80 24 0.
  33.                  USER, which  returns a  string of  the format "<username>"
  34.                "<calling from>" <access>, where access is one of:  GUEST (a
  35.                first  time  caller,  access  0), MEMBER (anyone with access
  36.                greater than 0 and less than  the privileged  access level),
  37.                CO-SYSOP  (anyone  with  access  equal  to  or  greater than
  38.                privileged access, but  less  than  255),  or  SYSOP (access
  39.                255).   An example  return string could be: "Tim Aston" "St.
  40.                Catharines, Ont." MEMBER
  41.  
  42.                eg:  BBSIDENTIFY ABBEREXX
  43.                     BBSIDENTIFY BBS
  44.                     BBSIDENTIFY EMULATION
  45.                     BBSIDENTIFY NAME
  46.                     BBSIDENTIFY SYSOP
  47.                     BBSIDENTIFY TERM
  48.                     BBSIDENTIFY USER
  49.  
  50.                CHECKABORT -
  51.                Returns 1 if the user has  pressed  one  of  the  abort keys
  52.                (CTRL-C or the spacebar), otherwise 0.  Takes no parameters.
  53.  
  54.                CLS -
  55.                Sends  the  screen  clearing  code.  Takes no parameters and
  56.                returns nothing.
  57.  
  58.                GETCHAR -
  59.                Waits for a single character from the user.   It  returns as
  60.                soon as it gets something, and does not wait for the user to
  61.                press RETURN.  It  takes  no  arguments,  and  the character
  62.                received  will  be  returned,  or '###PANIC' if the user was
  63.                unexpectedly logged off due to carrier loss, timeout, etc.
  64.  
  65.                HANGUP -
  66.                Hangs the  online  caller  up,  and  after  the  ARexx macro
  67.                terminates, the  logoff procedure  will be initiated.  Note,
  68.                that if it is a local logon, nothing  actually happens until
  69.                the ARexx macro terminates.  Takes no parameters and returns
  70.                nothing.
  71.  
  72.                IREADY -
  73.                If there  is any  input waiting  in the  serial buffer, this
  74.                command returns  1, else  0.   No input is retrieved though.
  75.                It takes no parameters.
  76.  
  77.                MAYGETCHAR -
  78.                Checks if they user has  entered  a  character,  and returns
  79.                immediately, with  the result  being either the key the user
  80.                pressed or 'NOCHAR' if a key  was  not  pressed.    Takes no
  81.                parameters.
  82.  
  83.                eg:  MAYGETCHAR
  84.                     cmd=RESULT
  85.                     if cmd~='NOCHAR' then call do_cmd
  86.  
  87.                NEWLINE -
  88.                Sends the newline code (a carriage return followed by a line
  89.                feed).  Takes no parameters and returns nothing.
  90.  
  91.                PRINT <string> -
  92.                Sends the given string with a newline appended.   It returns
  93.                nothing.
  94.  
  95.                PROMPT <length> NORMAL|HIDE|YESNO|NOYES "<prompt>" -
  96.                Prompts the  user to enter text with the given length as the
  97.                maximum.  Three types of text input are currently supported:
  98.                  NORMAL: Normal line oriented input
  99.                  HIDE: As above, but  hid  user  input  behind  dashes (-).
  100.                Useful for passwords, etc.
  101.                  YESNO: A Yes or No response, with Yes as the default.
  102.                  NOYES: A Yes or No response, with No as the defalut.
  103.                The prompt text must be enclosed in quotes, an din order for
  104.                the BBS to  "see"  these  quotes,  they  themselves  must be
  105.                quoted (see examples).
  106.  
  107.                This  command  returns  the  string  entered in the cases of
  108.                NORMAL and HIDE types, and either  'Y' or  'N' in  the cases
  109.                the YESNO and NOYES types.
  110.  
  111.                eg:  PROMPT 30 'NORMAL' '"Enter your favourite colour: "'
  112.                     PROMPT 10 'HIDE' '"Where were YOU last night?'"
  113.                     PROMPT 1 'YESNO' '"Was it good for you?'"
  114.  
  115.                SEND <string> -
  116.                Sends the  given string  exactly as  is to the user, with no
  117.                translation or screening done on the part of TransAmiga.  It
  118.                returns nothing.
  119.  
  120.                SENDFILE <filename> -
  121.                Sends  the  given  text  file  to  the online user, the full
  122.                pathname must be given.  More? prompts will automatically be
  123.                displayed  as  usual,  and  all  TransAmiga imbedded control
  124.                codes are available as usual.  If the current user  has ANSI
  125.                turned on,  it will first look for <filename>.ANSI, and fall
  126.                back to the original filename if  that  is  not  found.   It
  127.                returns nothing.
  128.                [WWBBS will first search for `<filename>.<node>' and then
  129.                for `<filename>'.]
  130.  
  131.                eg: SENDFILE 'BBS:Text/Title'
  132.  
  133.                SETNODELOCATION <where> -
  134.                This allows  you to  change the string that indicates what a
  135.                user is doing that is displayed  with the  List Online Users
  136.                command, or the TrBLAD programme.  [WWBBS ignores this
  137.                command because the location is always automatically set
  138.                according to the menu location.]
  139.  
  140.                eg:  SETNODELOCATION 'Playing "Kill the Capitalists"'
  141.  
  142.                SYSOPLOG <string> -
  143.                Creates a  log entry  with the  given string.   The date and
  144.                time will  automatically  be  added  infront.    It  will be
  145.                appended to TransAmiga's log file.  It returns nothing.
  146.                [WWBBS will add to the log file according to the name of the
  147.                menu option, because WWBBS supports multiple logs under
  148.                different names.]
  149.  
  150.                eg:  SYSOPLOG 'Lost all his/her money at poker'
  151.  
  152.  
  153.           ABBEREXX Variables:
  154.  
  155.                Part of  the ABBEREXX  standard is  the maintenance of three
  156.                ARexx  variables.    These  are:  CARRIER,   TIMEONLINE  and
  157.                TIMELEFT.  CARRIER, as explained above, indicates whether or
  158.                not there is a user online line, it contains the  value 1 if
  159.                a  user  is  online,  0  otherwise.  TIMEONLINE and TIMELEFT
  160.                indicate, in minute, how much time the user has spent online
  161.                today  and   how  much   time  he/she  has  left  for  today
  162.                respectively.
  163.  
  164.                eg:  PRINT 'You've used' TIMEONLINE 'minutes today'
  165.                     QUERY 'How do you feel about that?'
  166.                     answer=RESULT
  167.  
  168.                     if CARRIER=0 then do
  169.                          SYSOPLOG 'Carrier Drop!'
  170.                          exit 10
  171.                     end
  172.                     if timeleft<=0 then do
  173.                          SYSOPLOG 'No more time!'
  174.                          exit 10
  175.                     end
  176.  
  177.                WWBBS also supports an additional variable called LOCAL.  If
  178.                the current user is logged on locally, then this variable is
  179.                set to 1, and is otherwise 0 (for remote users).
  180.  
  181.                Note that these variables are available only after the first
  182.                command is sent to WWBBS (an ABBEREXX command for example).
  183.  
  184.